perm filename CROSS[F82,JMC] blob
sn#692377 filedate 1982-12-17 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 cross[f82,jmc] Crossing the street and concurrent action
C00005 ENDMK
Cā;
cross[f82,jmc] Crossing the street and concurrent action
The problem of crossing a street safely may be an appropriate
toy problem involving concurrent events - the motion of the crosser
and the motion of the cars. It also may be a good example of a problem
that can be considered at differening levels of detail.
It may also be good to consider as a problem where some actions
can lead to disaster, i.e. being run over.
There are various formalizations that may be interesting.
1. We regard the motion of the pedestrian and the cars
as concurrent processes. There is a theory of concurrent processes
mainly concerned with synchronization. Clearly there is no master
program synchronizing the pedestrians and the cars. It is up
to the pedestrian to avoid the cars. Hmm. This suggests that
we consider concurrent programs in computers, wherein one program
runs on blindly, and the other can observe it well enough to avoid
being clobbered by it.
2. The simple production model has one rule: If a car is
coming wait one unit and ask again, else cross.
3. The reasoning model says: Cross the street but don't get
run over, i.e. starting across at a time that will get you run
over is not an acceptable solution. A model of type 3 can
compile, if there is no additional complication, into a program of
type 2.
4. Reasoning that includes conditions for knowing whether
a car is coming.